﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using Tracker.Domain.Entities;
using Tracker.Domain.DTOs;

namespace Tracker.Services.Abstract
{
    public interface IService<T, TDTO> where T : BaseEntity where TDTO : BaseEntityDTO
    {
        void Add(TDTO dto);
        void Update(TDTO dto);
        void Delete(int id);
        TDTO Get(int id);
        TDTO Get(Expression<Func<T, bool>> predicate);
        IList<TDTO> GetAll();
        IList<TDTO> GetAll(Expression<Func<T, bool>> predicate);
    }
}
